package kp.rpc.fault.tolerant;

import kp.rpc.model.RpcResponse;

import java.util.Map;

/**
 * @author tzf
 * @description: 容错接口
 * @date: 2024/6/7 14:50
 */

public interface TolerantStrategy {
    /**
     * @param context 上下文
     * @param e       异常
     * @return kp.rpc.model.RpcResponse
     * @description: 容错
     * @author tzf
     * @date: 2024/6/7 14:51
     */

    RpcResponse doTolerant(Map<String, Object> context, Exception e) throws Exception;
}
